'multi segment caps example from http://cairographics.org/samples'

out_file_name = __file__[:-1] + 'ng'#'example_multi_segment_caps.png'

surface_width = 256
surface_height = 256

from cairo_ctypes import *

surface = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, surface_width, surface_height);
cr = cairo_create(surface)

cairo_move_to (cr, 50.0, 75.0);
cairo_line_to (cr, 200.0, 75.0);

cairo_move_to (cr, 50.0, 125.0);
cairo_line_to (cr, 200.0, 125.0);

cairo_move_to (cr, 50.0, 175.0);
cairo_line_to (cr, 200.0, 175.0);

cairo_set_line_width (cr, 30.0);
cairo_set_line_cap (cr, CAIRO_LINE_CAP_ROUND);
cairo_stroke (cr);

cairo_surface_write_to_png(surface, out_file_name)

print('Result see in %s' % out_file_name)
